package com.atguigu.exer;

/**
 * @author azzn1400820029
 * @create 2021-12-12 19:39
 */
public class Exer3Test {
    public static void main(String[] args) {
        Exer3Test exer3Test = new Exer3Test();
        // 3.1test
//        exer3Test.method();
        // 3.2test
        int ret = exer3Test.method();
        System.out.println(ret);
        // 3.3test
        int ret1 = exer3Test.method(3, 2);
        System.out.println(ret1);
    }

//    3.1
//    public void method() {
//        for (int i = 0; i < 10; i++) {
//            for (int i1 = 0; i1 < 8; i1++) {
//                System.out.print("* ");
//            }
//            System.out.println();
//        }
//    }

    //    3.2
    public int method() {
        for (int i = 0; i < 10; i++) {
            for (int i1 = 0; i1 < 8; i1++) {
                System.out.print("* ");
            }
            System.out.println();
        }
        return 10 * 8;
    }

    //    3.3
    public int method(int m, int n) {
        for (int i = 0; i < m; i++) {
            for (int i1 = 0; i1 < n; i1++) {
                System.out.print("* ");
            }
            System.out.println();
        }
        return m * n;
    }
}

